If you wish to retain the settings of the various choice files from your earlier version of DeskEdit, you should proceed as follows. First move your working copy of DeskEdit 3 to somewhere safe, and install DeskEdit 4 in the manner described above. Now open the application directories of both DeskEdit 3 and 4 (by Shift-double-clicking on their icons in the directory viewer). Now simply drag the Choices and the Data directories from DeskEdit 3 to DeskEdit 4, and the job is done.
The one drawback to the above is that it will overwrite DeskEdit 4's Overrides file with your current DeskEdit 3 Overrides. The new file contains details of two new Overrides (related to printer use). To reinstate them, simply add the following two lines to your DeskEdit 3 Override file:
/ printer_formfeeds: yes
/ printer_endfeeds: no
/end
If you want to bring either of these features into play, you will need to remove the initial slash.
From a DeskEdit task window you can do all the normal things, like make a system call (e.g. type Cat to catalogue your current directory). Additionally the function keys F1 to F8 are available as programmable keys. Function keys F9 to F11 behave as they normally do in DeskEdit, so you can place markers and so on without having to unlink the task window first.
You will also find that the cursor keys are active in DeskEdit task windows (they are not in Edit), so it is easy to move around and look at parts of the window that have scrolled out of view. All Ctrl keys are also active - so you can mark a line with Ctrl-Sh-M for example as you would normally in a DeskEdit window.
Additionally the normal copy editing and the clipboard are continually active, and accessible directly from the keyboard. This means that if you are testing out a command - e.g. a sound command, you do not need to retype it every time - just mark it either with the mouse, or with Ctrl-M or Ctrl-Sh-M, then press Ctrl-B or Ctrl-C to copy it down to the command line. And if the line contains a carriage return - as it would if you selected it with Ctrl-Sh-M or treble-clicked with the mouse - then the line will not only be copied, it will also be automatically executed. You can also copy from any other DeskEdit window in this way.
You can even execute all the commands in an Obey file by dragging it to the task window directly from the Filer.
Run ADFS::HardDisc.$.DeskEdit -tw ADFS::HardDisc.$.Letter
You can even send your own user commands to a task window (one will be opened if there is none available). To do this, use the w command in your list of user commands in the file !DeskEdit.Data.Commands - e.g.:
Compile=\w run adfs::HardDisc.$.makefile
Root Cat=\w cat adfs::HardDisc.$
Performing a Ctrl-Sh-F3 save when in C mode works similarly, except that here, DeskEdit searches the first few lines of the source file for the name of a file to run - which could be a Make file, or better still, an Exec or Obey file which controls the Make process. The keyword task_window is used, as in the example below:
/* task_window: adfs::HardDisc.$.C.compile
*/
As an added bonus, you can also include the switch -b, to send the current window to the back of the stack. This puts it out of the way until you need it (Ctrl-Sh-Enter will bring it back again). With the switch the above example becomes:
/* task_window: -b adfs::HardDisc.$.C.compile
*/
There are ten available macro buffers for each of DeskEdit's three languages (Text, Basic and C). Each of these can be given a textual label to assist in remembering the function you have assigned to it, and each can accommodate up to 50 keypresses. All keystroke macros can be saved directly from the Save button on the Macros dialogue box.
The ten macros are associated with the letters Q-P on the second row of the keyboard. Use Esc-Sh-<key> to toggle recording on/off, and Esc-<key> to play back a macro at any time.
Thus for example if you press Escape-Sh-Q, the "Q" macro will start recording every keypress. Press the Down cursor key 3 times, then hit Escape-Sh-Q (or any other macro key since these all cancel recording), and you will have recorded a sequence of three Cursor-down movements. To use these at any time, just hit Escape-Q.
You can also control the process from the dialogue box on Ctrl-F7. Press Ctrl-F7 to display the box (or select it from the Misc edit submenu), then click on Q to select this as the current macro. You can optionally type in a memorable name of up to 11 characters (e.g. 3xCursorDwn). Click on Record to start recording, and then press Cursor down three times. Press Ctrl-F7 to stop the recording. The dialogue box will now show the length of the recording under Q. It should be 3.
Clicking on Playback will play the selected macro, while clicking on Save will save your macros to disc.
This new macro facility is very powerful, though there is just one thing that you cannot yet do with it: it will not record the keys typed into any dialogue box. If there is sufficient demand this feature may be included in a future release.
<Right-hand-Shift><Left-Cursor> | (new feature - see later) |
Ctrl-I | |
<Right-hand-Shift><Right-Cursor> | (new feature - see later) |
Ctrl-O |
Now stop recording. Now whenever you play back this macro, the word at the caret (regardless of exactly where the caret is in the word) will receive an Italics on code at the start, and an All Codes Off code at the end. It will even work if the word is immediately followed by some form of punctuation. By a similar process you can create a macro to remove such a pair of codes, though if you apply it to a word without codes, it will simply remove the first and last letter of the word.
The second example shows how to use a macro in conjunction with a Quick-search. Suppose you want to find occurrences of variables containing the sequence _paint, and add to them the sequence my_ at the start - so that xx_paint_loader and load_paint_brush would become my_xx_paint_loader and my_load_paint_brush. This is tricky to do using Find on F4, and anyway the wildcard specifiers in Find can be pretty cumbersome. So, to use Quick-search, just initiate a Quick-search using Ctrl-F, and search for _paint. This should take you to a find. Now start recording a macro, and use the following five keys:
<Right-hand-Shift><Left-Cursor> | (new feature - see later) |
m | |
y | |
_ | (underscore) |
Ctrl-N |
Then stop recording.
Now every time you play back this macro it will amend the variable at the caret, and move you on to the next find. If you want to alter this find, play the macro again, or if you want to just move on to the next find without altering the current one, press Ctrl-N.
Note the way that we have put the Ctrl-N at the end of the macro sequence, to give us the option of rejecting the replace.
OSCLI("Set DeskEdit$ERL "+STR$(ERL))
Once your program hits an error, just press Ctrl-G (for Goto Error Line), in the DeskEdit window containing the source file, and you will be taken to the error line. And this works regardless of whether your program is neatly numbered by tens or not. Note that DeskEdit's throwback window must be closed for this to work, since Ctrl-G is also used to take you to the next throwback line.
The new invisible marker on Escape-G will take you back to where you were before you issued a Ctrl-G.
DeskEdit$goto
To make it work, simply set this variable to the line number required, and then press Ctrl-Sh-G in any window to go to that line number. One use for this would be in Basic or C programs which handle data or text files. Your program could check through a data file, and if it came to an error, it could report the error in the normal way, but also set DeskEdit$goto to the line number in the data file where the data needs editing. All you do then is press Ctrl-Sh-G from the DeskEdit window holding the data file, and you will be taken straight to the error line. There are I am sure, many other uses for this trick, and if you come across any interesting ones, please write in.
The new invisible marker on Escape-G will take you back to where you were before you issued a Ctrl-Sh-G.
The new non-wildcard search has been implemented in a special way to assist programmers in both C and Basic who want to search for particular variable names etc. (though it will also be useful in Text mode). It is designed to enable you to find, for example, all references to the variable i without finding anything else which happens to contain the letter i.
Thus for example in earlier Quick-searches, if you opted to search for i, you would get every word with i in it. By turning off the wildcards at the start and end of the search string you can specify a search for i on its own, and this will find all cases where the variable name i has been used, including:
i = 0
i=0
i,j,l
b[i]
99+(i)=1
2*i+4
$i=9
3-i-7=0
PROCi
, my_i
and ii
etc.
In Basic it is currently fooled by placing variable names immediately adjacent to Basic keywords, as in:
NEXTi
The override printer_formfeeds can now be set to "yes". This simply replaces the very last line-feed on each page with a page-feed. This (somewhat paradoxically) avoids the problem with some drivers which resulted in double page feeds. The earlier solution of using artificially long page lengths is now redundant, so the driver page size should now be set to exactly match the size in DeskEdit's Page set up dialogue box.
Additionally the override printer_endfeeds can be set to "no" to stop the last page being pushed out. The drivers normally issue a page feed as part of the end of job sequence, so this avoids a double page at the end.
To set these overrides, you will need to load the file DeskEdit$Choices.Overrides into DeskEdit, and remove the leading slash from the lines:
/ printer_formfeeds: yes
/ printer_endfeeds: no
Two new key combinations have been implemented to move the caret to the start or end of a word. This is particularly useful for including in Key macros etc, and takes account of punctuation. The keys, which use the Right-hand Shift key in conjunction with the Left or Right cursor keys are:
<Right-hand-Shift><Left-Cursor> | Go to start of word |
<Right-hand-Shift><Right-Cursor> | Go to end of word |
The new key combination:
int i; /* loop variable */ |
char string[100]; /* temporary string */ |
dbox d; /* prog info dialogue box */ |
would become:
int i; | /* loop variable */ |
char string[100]; | /* temporary string */ |
dbox d; | /* prog info dialogue box */ |
after pressing Escape-Tab three times (since it moves on to the next line after alignment), and it doesn't matter where on the line the caret is positioned. It takes the length of the line from the width as set on Escape-F5.
DeskEdit 4 also incorporates a number of minor bug fixes and improvements, including the following:
Copyright © Lee Calcraft 1994
Published by BEEBUG Ltd, 117 Hatfield Road, St Albans, Herts AL1 4JS. Tel. 0727 840303